import Vue from 'vue'
import Router from 'vue-router'
import HomePage from '@/pages/HomePage/HomePage'
import HomeCon from '@/pages/HomeCon'
import HelloWorld from '@/components/HelloWorld'
import RecieveAddress from '@/pages/RecieveAddress/RecieveAddress'
import GoodDetails from '@/pages/GoodDetails/GoodDetails'
import Test from '@/components/Test'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'HomePage',
      component: HomePage,
      redirect: '/home',
      children: [
        {
          path: 'home',
          component: HomeCon
        },
        {
          path: 'cart',
          meta: {name:'hello'},
          component: HelloWorld
        },
        {
          path: 'order',
          component: HelloWorld
        },
        {
          path: 'my',
          component: HelloWorld
        }
      ]
    },
    {
      path: '/addresslist',
      name: 'RecieveAddress',
      component: RecieveAddress
    },
    {
      path: '/goodDetails',
      name: 'GoodDetails',
      component: GoodDetails
    },
    {
      path: '/test',
      name: 'Test',
      component: Test
    }
  ],
  linkActiveClass: 'active'
})
